Skip to content

Improve curl commands#506

Open
rob93c wants to merge 3 commits into
mainfrom
configure-curl-retries
Open

Improve curl commands#506
rob93c wants to merge 3 commits into
mainfrom
configure-curl-retries

Conversation

@rob93c
Copy link
Copy Markdown
Member

@rob93c rob93c commented May 30, 2026

Summary by CodeRabbit

  • Chores
    • Improved FFmpeg and FFprobe setup for macOS and Windows to make downloads more reliable and resilient (includes retry behaviour).
    • Enhanced error handling and reporting during installation, now exposing the effective download URL to aid troubleshooting.

Review Change Stack

@rob93c rob93c requested a review from MartelliEnrico May 30, 2026 18:43
@rob93c rob93c self-assigned this May 30, 2026
@rob93c rob93c added enhancement New feature or request cicd The change affects CI/CD flows labels May 30, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 30, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ff1bbea7-cb5f-4311-8eb7-cc37f3d89336

📥 Commits

Reviewing files that changed from the base of the PR and between e73dfad and 965107f.

📒 Files selected for processing (1)
  • .github/actions/setup-ffmpeg/action.yml
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/actions/setup-ffmpeg/action.yml

📝 Walkthrough

Walkthrough

The GitHub Actions setup-ffmpeg workflow is enhanced to download FFmpeg and FFprobe using curl with silent mode, automatic redirect following, retry logic, and effective URL logging for both macOS and Windows platforms before extracting and relocating the binaries.

Changes

FFmpeg Download Resilience

Layer / File(s) Summary
curl-based downloads with retry logic and URL tracking
.github/actions/setup-ffmpeg/action.yml
macOS and Windows FFmpeg/FFprobe downloads are updated to use curl -sS -f -L --retry 3 --retry-delay 5 -w for enhanced reliability, redirect handling, and observability before unzipping and moving binaries to $INSTALL_DIR.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • Stickerifier/Stickerify#448: Both PRs modify the same FFmpeg setup workflow file, switching to curl with redirect handling and retry logic for macOS and Windows downloads.

Poem

🐰 A curl of the whiskers, a hop on the run,
Silent retries fetching binaries done.
Redirects respected, the URL shown bright,
FFmpeg lands safely, all set for the night.
🥕

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'Improve curl commands' is vague and does not clearly convey the specific improvements made to the curl commands in the GitHub Actions FFmpeg setup. Consider a more descriptive title such as 'Add retry logic and error handling to curl commands in FFmpeg setup' to better communicate the specific changes.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/actions/setup-ffmpeg/action.yml:
- Around line 31-33: Add archive integrity verification before extracting
downloaded FFmpeg zips: after each curl that writes ffmpeg.zip (the command
using "https://www.osxexperts.net/ffmpeg${FF_VERSION}arm.zip" and the other
similar curl invocations referenced), also download the corresponding SHA-256
checksum or signature from a trusted source, compute the local checksum (e.g.,
using shasum -a 256 or sha256sum) for the saved ffmpeg.zip, compare it to the
trusted checksum and fail the action if they differ, and only proceed to
unzip/extract when the verification succeeds; apply the same checksum
download+verify flow to the other curl blocks mentioned (lines 36-38 and 45-47)
so every downloaded archive is verified before extraction.
- Around line 31-33: The curl downloads for FFmpeg currently don't treat HTTP
4xx/5xx as errors, so add the --fail flag to the curl invocations that fetch
"https://www.osxexperts.net/ffmpeg${FF_VERSION}arm.zip" (and the other two
FFmpeg download curl commands referenced nearby) so HTTP errors trigger the
configured --retry/--retry-delay and fail fast before unzip; keep the existing
flags (-sS -L --retry 3 --retry-delay 5) and simply insert --fail into those
curl command arguments.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 2fed14c3-8d0b-4a3a-8dc4-6c1158244401

📥 Commits

Reviewing files that changed from the base of the PR and between 8ca771a and e73dfad.

📒 Files selected for processing (1)
  • .github/actions/setup-ffmpeg/action.yml

Comment thread .github/actions/setup-ffmpeg/action.yml Outdated
coderabbitai[bot]
coderabbitai Bot previously approved these changes May 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cicd The change affects CI/CD flows enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant